-
Notifications
You must be signed in to change notification settings - Fork 0
feat: TUI rework; v0.1.0-alpha.2
#59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
basic scaffolding for a new tui old tui has been moved to a folder called and has been gitignored for cleanliness
- new sqlc func for get all collections - some bug fixes in the list config - changed existing list collections func to not use pagination - added a generic to list config for crud - defined the crud struct - added a crud struct to the collections view which is supplied to the list component
- bug fixes in main model - made it so that colors are not exposed, only styles are - updated the update func for options provider to forward messages to the list component - set up the list crud op and the item mapper for collections view - changed generics in the list config so it makes more sense - updated the footer func for collections
…returns endpoint counts
- created a messages package for circulating messages - removed crud from the config and gave it access to only the list func - added generics to the OptionsProvider - styled the input and added functionality to add collections - created and input config - added some styling attributes - extracted some colors from the styles and made vars out of them
…eralise into a component)
- added a new db query for listing all endpoints by collection (non paginated) - created a new manager function for fetching these - renamed the old function responsible for listing eps - changed the tests for the old function to make sure the still work - slightly modified the choose items message to make it work better when sent by different views - more work on the ep view to make it display eps - the addition of a set state function to the interface to set the state of certain views
- Remove EndpointCount field from core CollectionEntity - Use simple GetCollections query without JOIN - Add GetEndpointCountsByCollections query - Update itemMapper to fetch counts only for display
- Add NavigateToView message type - Views emit navigation messages, app handles routing
ItemAdded now uses commands, improving internal consistency and laying the groundwork for better error handling/UI updates.
- Reflects architectural improvements and backend cleanup - Message-driven navigation and CRUD operations - Performance improvements with efficient batch queries - Enhanced error handling prototype
It won't work if you're on "Collections" view because there's no going back from there. I've kept this separate from `Ctrl-c` quit as to have different key-stroke flows for going back/forth vs quitting the app.
This reverts commit b0311e1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix the failing tests coming from changed behavior in d098bb7 where we allow endpoints creation with empty URL.
maniac-en
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please follow this pattern of test error output format:
Expected <this>, got <this> - Please add a reverse-check within the same test that empty URL is indeed preserved. Currently, you're only checking is error returned is
nilor not!
My suggestion:
endpoint, err := manager.CreateEndpoint(ctx, data)
if err != nil {
t.Errorf("Expected empty URL to be allowed, got error: %v", err)
}
if endpoint.URL != "" {
t.Errorf("Expected empty URL to be preserved, got %s", endpoint.URL)
}
maniac-en
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
v0.1.0.alpha.2v0.1.0-alpha.2
Complete TUI rework:
Backend and architecture improvements:
UI/UX redesign: